<doc>
<contents_area>
<div id="Content" style="padding: 5px;">
<h1><a name="PyDevProjectCreation-CreatingaProject"></a>Creating a Project</h1>

<p>Ok, now that your interpreter is configured, it is time to <b>create a project</b>. </p>

<p>After opening Eclipse, go to the menu:<br/>
<b>file &gt; new &gt; project &gt; PyDev &gt; PyDev project</b>. You should see the screen below:</p>


<p><span class="image-wrap" style=""><img src="images/new_project.png" style="border: 1px solid black" /></span><br/>
<b>Project name</b>: this is the name of the project.</p>

<p><b>Project contents</b>: where it should be located. </p>

<p><b>Project type</b>: defines the set of interpreters that will be available for that project.</p>

<p><b>Grammar version</b>: the grammar used for parsing the files in this project. It doesn't have to match the grammar of the <br/>
actual interpreter selected. This is done so that you can use a newer interpreter while having the grammar you use <br/>
compatible with an older interpreter (e.g.: using a Python 2.6 interpreter with a Python 2.4 grammar in the project).</p>

<p><b>Interpreter</b>: Defines which interpreter should be used for code-completion and default run configurations (note that<br/>
you can still create a run configuration with a different interpreter). </p>

<p><b>Create default 'src' folder and add it to the pythonpath</b>: If you don't leave that option checked, you'll have to create<br/>
the source folder(s) yourself after the project is created (which is covered in the next tutorial page).</p>

<p>You may finish in this screen or go to the next, where you will be asked which projects are referenced from this one. </p>


<h1><a name="PyDevProjectCreation-Referencedprojects"></a>Referenced projects</h1>

<p>The referenced projects are the projects whose source folders are added to the PYTHONPATH for the <br/>
referrer project.</p>


<p>The <a href="manual_101_project_conf2.html" title="PyDev Project Configuration">next tutorial page</a> enters into more details on project references </p>

<h1><a name="PyDevProjectCreation-CreatingaProjectfromexistingsources"></a>Creating a Project from existing sources</h1>

<p>   If you <b>created the project inside Eclipse</b>, you just have to import the project again <br/>
   (in <b>files &gt; import &gt; general &gt; existing projects into workspace</b>) &#8211; it'll look for the existing .project<br/>
   file and will configure it automatically from the existing configuration. </p>

<p>   If you have the sources from an existing project that wasn't created in Eclipse, you have 2 options:</p>

<ul class="alternate" type="square">
	<li>Create the project as if it was a new project, but leave the <b>create default 'src' folder</b> option<br/>
     <b>unchecked</b> and point the location to the location of the sources (or a level above) &#8211; the next tutorial page <br/>
     will explain the steps to configure the PYTHONPATH (which should be done after creating the project this way).</li>
</ul>


<ul class="alternate" type="square">
	<li>Create a new project in the default workspace and create a folder that's a <b>link to your existing sources</b>. Note<br/>
     that this link folder must be added to the PYTHONPATH in the next step.</li>
</ul>


<p>     <b>Note 1</b>: <b>links</b> can be used <b>above the source folder</b> or <b>as the source folder</b>, but <br/>
     <b>never inside a source folder</b>, as it's not supported by PyDev)</p>

<p>     <b>Note 2</b>: To create the folder as a link, choose the <b>file &gt; new &gt; folder</b> from the menu and in the new folder<br/>
     dialog select the <b>Advanced &gt;&gt;</b> options.</p>

<p>     <b>Note 3</b>: If the file structure you have is:</p>

<blockquote>
<p>myproject<br/>
.../  _<em>init</em>_.py<br/>
.../  module.py</p></blockquote>
<p>     	and you want to make the import:</p>
<blockquote>
<p><b>from myproject import module</b></p></blockquote>
<p>     	you have to add to the project the <b>folder above myproject</b> (as the folder above myproject <br/>
     	will be your source folder &#8211; as required by Python).</p>








</div>
</contents_area>
</doc>